package cn.huiyunche.base.service.utils;

public class TimeUtils {

    public static String howLongAgo(Long time) {
        if (time > 0) {
            //当前时间
            Long now = System.currentTimeMillis();
            Long timeLeft = now - time;

            if (0 < timeLeft) {
                return (int) Math.floor(timeLeft / 60000) + "分钟前";
            }
        }
        return null;
    }

}
